3.4.54 \(\int (f x)^{-1+m} (a+b \log (c x^n)) \, dx\) [354]

Optimal. Leaf size=38 \[ -\frac {b n (f x)^m}{f m^2}+\frac {(f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m} \]

[Out]

-b*n*(f*x)^m/f/m^2+(f*x)^m*(a+b*ln(c*x^n))/f/m

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {2341} \begin {gather*} \frac {(f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m}-\frac {b n (f x)^m}{f m^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(f*x)^(-1 + m)*(a + b*Log[c*x^n]),x]

[Out]

-((b*n*(f*x)^m)/(f*m^2)) + ((f*x)^m*(a + b*Log[c*x^n]))/(f*m)

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin {align*} \int (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right ) \, dx &=-\frac {b n (f x)^m}{f m^2}+\frac {(f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 29, normalized size = 0.76 \begin {gather*} \frac {(f x)^m \left (a m-b n+b m \log \left (c x^n\right )\right )}{f m^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^(-1 + m)*(a + b*Log[c*x^n]),x]

[Out]

((f*x)^m*(a*m - b*n + b*m*Log[c*x^n]))/(f*m^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.05, size = 281, normalized size = 7.39

method result size
risch \(\frac {b x \,{\mathrm e}^{\frac {\left (-1+m \right ) \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}} \ln \left (x^{n}\right )}{m}+\frac {\left (-i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) m +i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} m +i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} m -i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} m +2 b \ln \left (c \right ) m +2 a m -2 b n \right ) x \,{\mathrm e}^{\frac {\left (-1+m \right ) \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}}}{2 m^{2}}\) \(281\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(-1+m)*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

b/m*x*exp(1/2*(-1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*csgn(I*x)-I*Pi*csgn(
I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))*ln(x^n)+1/2*(-I*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*m+I*Pi*b
*csgn(I*c)*csgn(I*c*x^n)^2*m+I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*m-I*Pi*b*csgn(I*c*x^n)^3*m+2*b*ln(c)*m+2*a*m-2
*b*n)/m^2*x*exp(1/2*(-1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*csgn(I*x)-I*Pi
*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 48, normalized size = 1.26 \begin {gather*} -\frac {b f^{m - 1} n x^{m}}{m^{2}} + \frac {\left (f x\right )^{m} b \log \left (c x^{n}\right )}{f m} + \frac {\left (f x\right )^{m} a}{f m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-b*f^(m - 1)*n*x^m/m^2 + (f*x)^m*b*log(c*x^n)/(f*m) + (f*x)^m*a/(f*m)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 42, normalized size = 1.11 \begin {gather*} \frac {{\left (b m n x \log \left (x\right ) + b m x \log \left (c\right ) + {\left (a m - b n\right )} x\right )} e^{\left ({\left (m - 1\right )} \log \left (f\right ) + {\left (m - 1\right )} \log \left (x\right )\right )}}{m^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

(b*m*n*x*log(x) + b*m*x*log(c) + (a*m - b*n)*x)*e^((m - 1)*log(f) + (m - 1)*log(x))/m^2

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (31) = 62\).
time = 6.49, size = 119, normalized size = 3.13 \begin {gather*} \begin {cases} \tilde {\infty } \left (a x - b n x + b x \log {\left (c x^{n} \right )}\right ) & \text {for}\: f = 0 \wedge m = 0 \\0^{m - 1} \left (a x - b n x + b x \log {\left (c x^{n} \right )}\right ) & \text {for}\: f = 0 \\\frac {\begin {cases} a \log {\left (x \right )} & \text {for}\: b = 0 \\- \left (- a - b \log {\left (c \right )}\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\\frac {\left (- a - b \log {\left (c x^{n} \right )}\right )^{2}}{2 b n} & \text {otherwise} \end {cases}}{f} & \text {for}\: m = 0 \\\frac {a \left (f x\right )^{m}}{f m} + \frac {b \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m} - \frac {b n \left (f x\right )^{m}}{f m^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**(-1+m)*(a+b*ln(c*x**n)),x)

[Out]

Piecewise((zoo*(a*x - b*n*x + b*x*log(c*x**n)), Eq(f, 0) & Eq(m, 0)), (0**(m - 1)*(a*x - b*n*x + b*x*log(c*x**
n)), Eq(f, 0)), (Piecewise((a*log(x), Eq(b, 0)), (-(-a - b*log(c))*log(x), Eq(n, 0)), ((-a - b*log(c*x**n))**2
/(2*b*n), True))/f, Eq(m, 0)), (a*(f*x)**m/(f*m) + b*(f*x)**m*log(c*x**n)/(f*m) - b*n*(f*x)**m/(f*m**2), True)
)

________________________________________________________________________________________

Giac [A]
time = 4.77, size = 64, normalized size = 1.68 \begin {gather*} \frac {b f^{m} n x^{m} \log \left (x\right )}{f m} + \frac {b f^{m} x^{m} \log \left (c\right )}{f m} + \frac {a f^{m} x^{m}}{f m} - \frac {b f^{m} n x^{m}}{f m^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

b*f^m*n*x^m*log(x)/(f*m) + b*f^m*x^m*log(c)/(f*m) + a*f^m*x^m/(f*m) - b*f^m*n*x^m/(f*m^2)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int {\left (f\,x\right )}^{m-1}\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(m - 1)*(a + b*log(c*x^n)),x)

[Out]

int((f*x)^(m - 1)*(a + b*log(c*x^n)), x)

________________________________________________________________________________________